import javax.imageio.ImageIO;
import java.io.IOException;

public class hero extends fly{
    protected int blood;
    protected int score;
    protected bullet[] bts;
    int index = 0;

    //构造方法 - 初始化成员变量
    public hero(){
        this.blood = 3;
        this.score = 0;
        //从父类中继承过来的成员变量初始化
        pic = JpanelDemo.hero;
        width = getPic().getWidth();
        height = getPic().getHeight();
        x = 200;
        y = 200;
    }

    @Override
    public void move() {
        /*index ++;
        if (index > 1) index = 0;
        try {
            pic = ImageIO.read(JpanelDemo.class.getResourceAsStream("pic\\hero" + index + ".png"));
        } catch (IOException e) {
            e.printStackTrace();
        }*/
    }
}
